<template>
  <div class="wrapper" bubble="true">
    <div class="routeChild1" style="color: white;">
        <text  class="text"></text>
      </div>
    <div class="router">
      <div class="routeChild"  @click="BonreetoRoot">
        <text  class="text">Root</text>
      </div>
      <div class="routeChild"  @click="BonreetoError">
        <text  class="text">Error</text>
      </div>
      <div class="routeChild" @click="BonreetoHome">
        <text class="text">home</text>
      </div>

    </div>
    <div class="router">
      <div class="routeChild" @click="BonreetoAbout">
        <text class="text">about</text>
      </div>
      <div class="routeChild" @click="BonreetoNet">
        <text class="text">Net</text>
      </div>
      <div class="routeChild" @click="BonreetoWebview">
        <text class="text">webview</text>
      </div>
    </div>
    <div class="router">

      <div class="routeChild" @click="BonreetoSecond">
        <text class="text">second</text>
      </div>
      <div class="routeChild" @click="BonreetoPicker">
        <text class="text">picker</text>
      </div>
      <div class="routeChild" @click="BonreetoModel">
        <text class="text">model</text>
      </div>
    </div>
    <router-view/>
  </div>
</template>

<script>
// var navigator = weex.requireModule('navigator')
export default {
  name: 'App',
  data () {
    return {
      logo: 'https://gw.alicdn.com/tfs/TB1yopEdgoQMeJjy1XaXXcSsFXa-640-302.png'
    }
  },
  methods: {
    BonreetoRoot () {
      // if(weex.config.env.platform == 'Web'){
      console.log(this.$router)
      this.$router.push('/')
      // }else{
      //     navigator.push({
      //         url: 'http://192.168.31.79:8081/dist/second.js',
      //         title: '新页面',
      //         animated: "true",
      //         params: {
      //           id: 11111
      //         }
      //     })
      // }
    },
    BonreetoError () {
      // if(weex.config.env.platform == 'Web'){
      console.log(this.$router)
      this.$router.push('/error')
      // }else{
      // navigator.push({
      //   url: 'http://172.27.236.171:8081/dist/net.js',
      //   title: '新页面',
      //   animated: 'true',
      //   params: {
      //     id: 11111
      //   }
      // })
      // }
    },
    BonreetoNet () {
      // if(weex.config.env.platform == 'Web'){
      console.log(this.$router)
      this.$router.push('/net')
      // }else{
      // navigator.push({
      //   url: 'http://172.27.236.171:8081/dist/net.js',
      //   title: '新页面',
      //   animated: 'true',
      //   params: {
      //     id: 11111
      //   }
      // })
      // }
    },
    BonreetoHome () {
      // if(weex.config.env.platform == 'Web'){
      console.log(this.$router)
      this.$router.push('/home')
      // }else{
      // navigator.push({
      //     url: 'http://192.168.31.79:8081/dist/second.js',
      //     title: '新页面',
      //     animated: "true",
      //     params: {
      //       id: 11111
      //     }
      // })
      // }
    },
    BonreetoAbout () {
      // if(weex.config.env.platform == 'Web'){
      console.log(this.$router)
      this.$router.push('/about')
      // }else{
      // navigator.push({
      //     url: 'http://192.168.31.79:8081/dist/second.js',
      //     title: '新页面',
      //     animated: "true",
      //     params: {
      //       id: 11111
      //     }
      // })
      // }
    },
    BonreetoSecond () {
      // if(weex.config.env.platform == 'Web'){
      console.log(this.$router)
      this.$router.push('/second')
      // }else{
      // navigator.push({
      //     url: 'http://192.168.31.79:8081/dist/second.js',
      //     title: '新页面',
      //     animated: "true",
      //     params: {
      //       id: 11111
      //     }
      // })
      // }
    },
    BonreetoWebview () {
      // if(weex.config.env.platform == 'Web'){
      console.log(this.$router)
      this.$router.push('/wxwebview')
    },
    BonreetoPicker () {
      // if(weex.config.env.platform == 'Web'){
      console.log(this.$router)
      this.$router.push('/wpicker')
    },
    BonreetoModel () {
      // if(weex.config.env.platform == 'Web'){
      console.log(this.$router)
      this.$router.push('/Wmodel')
    }
  }
}
</script>

<style scoped>
/* .wrapper{
  width: 600px;
} */
  .router{
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    text-align: center;
    flex-wrap:row wrap;
  }
  .routeChild1{
   height: 60px;
    margin: 5px;
    padding: 5px 10px;
  }
  .routeChild{
    height: 100px;
    width: 200px;
    margin: 5px;
    padding: 5px 10px;
    background-color: rgb(128, 128, 128);
    text-align: center;
    line-height: 100px;
    align-items: center;
  }
  .text{
    color: blue;
    line-height: 100px;
    height: 100px;
    width: 100px;
    text-align: center;
  }
</style>
